#!/bin/sh
# chkconfig: 234 90 90
# description: ppomppu service

case "$1" in
        start)
                echo "ppomppu scanner start"
                #sudo -u netsga python /home/netsga/workspace/htmlparserkhk/htmlParser.py >> /dev/null &
                python /home/netsga/workspace/htmlparserkhk/htmlParser.py >> /dev/null &
        ;;

        stop)
                echo "ppomppu scanner stop"
                kill -9 `ps -ef | grep htmlParser | grep -v grep| awk '{print $2}'` &> /dev/null	
        ;;

        restart)
                echo "ppomppu scanner restart"
                kill -9 `ps -ef | grep htmlParser | grep -v grep| awk '{print $2}'` &> /dev/null	
                sudo -u netsga python /home/netsga/workspace/htmlparserkhk/htmlParser.py >> /dev/null &
        ;;


        *)
                echo "Usage:{start|stop|restart}"
                exit 1
esac
exit 0
